
import parseRoutes from "../config/asyncRouter";

/**
 * 
 * @description 合并路由表
 * @param {*请求回来的路由权限树} asyncRouterConfig 
 * @param {*本地路由数据} baseRouters 
 * @returns 
 */
const mergeRoutes = (asyncRouterConfig = [], baseRouters = []) => {
    let routes = baseRouters;
    routes[0].children = parseRoutes(asyncRouterConfig);
    return routes
};
export default mergeRoutes;